package pages;

import org.openqa.selenium.By;
import utils.Log4Test;
import utils.WebDriverWrapper;

/**
 * Created by Vadim on 6/10/14.
 */
public class PhonesPage extends BasePage{
    private static final String URL_PHONES = "http://rozetka.com.ua/phones-mp3-gps/c80257/";
    private static final By pagePhones = By.xpath(".//*[@id='phones-mp3-gps']/div/a");

    public PhonesPage(WebDriverWrapper driver) {
        super(driver, URL_PHONES);
    }

    public void open() {
        driver.findElement(pagePhones).click();
        if (driver.getCurrentUrl().equals(URL_PHONES)) {
            Log4Test.info("Page phones and mp3 is opened");
        } else {
            Log4Test.error("Page phones and mp3 isn't opened");
        }
    }

}
